1. Field of the Invention
The present invention relates to a rendering program, a rendering apparatus, and a rendering method for attaching a texture of a fabric to a sterical model created beforehand in a virtual three-dimensional space and rendering the sterical model.
2. Description of the Related Art
In the field of computer graphics, rendering of a sterical model by using a reflection function defining a relationship of a ray direction and eye direction to reflected light is generally known. Here, Kajiya-Kay model has been known as a reflection function of a fur (see J, Kajiya, T. Kay, “Rendering fur with three dimensional textures,” proceedings of SIGGRAPH (1989)).
Equations (A) to (C) represent Kajiya-Kay model. Furthermore, FIG. 20 is a diagram for explaining Kajiya-Kay model.I=Is+Id  (A)Is=Ks·S·cosp[acos {L*(−T)}−acos(V*T)]  (B)Id=Kd·sin(acos(L+T))  (C)                I: Energy of reflected light        Is: Energy of a specular reflection component of the reflected light        Id: Energy of a diffuse reflection component of the reflected light        P: Coefficient representing the spread of the reflected light        Ks: Coefficient for controlling the energy of the specular reflection component        Kd: Coefficient for controlling the energy of the diffuse reflection component        L: Unit vector representing a ray direction        V: Unit vector representing a direction of a visual point        T: Unit vector representing a fiber direction        
In Kajiya-Kay model, therefore, the energy of reflected light can be obtained by setting the eye direction, fiber direction, ray direction and the like.
In Kajiya-Kay model, however, because the coefficients Ks, Kd are not defined based on the reflection property of an actual yarn that is obtained by changing the light source and eye direction and measuring the reflected light of the yarn, it was difficult to reproduce the quality of the yarn realistically. Moreover, since Kajiya-Kay model is used in furs or other fabric made of napped long fibers, it was difficult to reproduce a realistic material of a napped fabric.